package design.patterns.chainmode.staticchain;

/**
 * @Desc:   具体处理者
 * @author: cww
 * @DateTime: 2020-06-12 23:31
 */

public class ConcreteHandler extends Handler {
    /**
     * 处理方法，调用该方法处理请求
     */
    @Override
    public void handleRequest() {
        if (getSuccessor()!=null){
            System.out.println("The request is passed to " + getSuccessor());
            getSuccessor().handleRequest();
        } else {
            System.out.println("The request handled here");
        }
    }
}
